﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;

namespace Mystery.SharePoint
{
    /// <summary>
    /// Defines an interface that can be used to determine if a user is allowed to provision site collections
    /// </summary>
    public interface ISiteProvisioningAuthenticationProvider
    {
        /// <summary>
        /// Checks if a user has the permission to provision a site collection
        /// </summary>
        /// <param name="context">The site collection the operation was initiated from</param>
        /// <param name="user">The user initiating the operation</param>
        /// <returns></returns>
        bool CanProvision(SPSite context, SPUser user);

        /// <summary>
        /// Gets the name of the provider
        /// </summary>
        string Name { get; }
    }
}
